<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="description" content="">
    <meta name="author" content="">
    <title>注册 - 宁师青柠BBS</title>
    <link rel="stylesheet" href="public/css/my-bootstrap.min.css">
    <link href="public/css/register.all.min.css" rel="stylesheet">
  </head>
  <body>
    <div class="header clearfix">
        <h1><a href="/nsbbs/" style="color:inherit;text-decoration:none;">宁师青柠</a></h1>
        <h3>bbs.ns.cn</h3>
    </div>
    <div class="main">
        <div class="main-label">
            <a href="javascript:history.go(-1)" style="margin-top: 10px" class="r"><small>«返回</small></a>
            注册青柠
        </div>
    <?php if($mail_flag) { ?>
        <div id="check-tip">账号激活邮件已经发送,请前往邮箱操作(在24小时内)完成账号激活哦~
        </div>
    <?php }else{ ?>
        <div id="zhu">注：若点击注册后输入框发生了变化,代表输入内容不合法,请看清输入提示,如果用户名输入规范还是发生了变化,代表该用户名已被占用</div>
        <form method="post">
        <div class="main-item">
            <label class="input-label" for="user"><span class="required"></span>用户名</label>
            <input name="user" type="text" value="<?php echo $_POST['user']?>" placeholder="2~16位英文字母/数字组合" class="form-control input-sm input bx" autocomplete="off" id="user">
            <span class="reg-msg">发帖时展示，一经注册不可更改</span>
        </div>
        <div class="main-item">
            <label class="input-label" for="nick"><span class="required"></span>昵称</label>
            <input name="nick" type="text" value="<?php echo $_POST['nick']?>" placeholder="例如，小青柠(不超过10个字符)" class="form-control input-sm input bx" id="nick">
            <span class="reg-msg">注册后可以随时更改</span>
        </div>
        <div class="main-item">
            <label class="input-label" for="pwd"><span class="required"></span>密码</label>
            <input name="pwd" type="password" value="<?php echo $_POST['pwd']?>" placeholder="8位以上的密码" class="form-control input-sm input bx" id="pwd">
            <span class="reg-msg">密码至少要8位</span>
        </div>
        <div class="main-item">
            <label class="input-label" for="pwd2"><span class="required"></span>确认密码</label>
            <input type="password" value="<?php echo $_POST['pwd']?>" placeholder="再次确认密码" class="form-control input-sm input bx" id="pwd2">
            <span class="reg-msg">请确认密码</span>
        </div>
        <div class="main-item">
            <label class="input-label" for="email"><span class="required"></span>电子邮箱</label>
            <input name="email" type="text" value="<?php echo $_POST['email']?>" placeholder="请使用常用邮箱，用来激活/找回密码" class="form-control input-sm input bx" id="email">
            <span class="reg-msg">一个邮箱只能注册一个账号</span>
        </div>
        <div class="main-item">
            <label class="input-label"><span class="required"></span>性别</label>
            <div id="sex" class="input">
                <label for="sex-man" class="sex-all"><span class="kuang <?php if(!isset($_POST['sex']) || $_POST['sex']==='1'){echo 'checked';}?>"></span><span class="sex">男</span></label>
                <label for="sex-woman" class="sex-all"><span class="kuang <?php if($_POST['sex']==='0'){echo 'checked';}?>"></span><span class="sex">女</span></label>
                <input type="radio" name="sex" id="sex-man" value="1" class="unvisiable" <?php if(!isset($_POST['sex']) || $_POST['sex']==='1'){echo 'checked';}?>>
                <input type="radio" name="sex" id="sex-woman" value="0" class="unvisiable" <?php if($_POST['sex']==='0'){echo 'checked';}?>>
            </div>
        </div>
        <div class="main-item">
            <label class="input-label" for="phone">联系电话</label>
            <input name="phone" value="<?php echo $_POST['phone']?>" type="text" class="form-control input-sm input" id="phone">
        </div>
        <button name="submit" id="submit" style="margin-right:20px">注册</button> <a href="login.php">已有账号，去登录</a>
        <div style="height:15px;margin-bottom:5px">
            <?php echo $err?>
        </div>
        <div class="reg-msg">点击注册，即表示你阅读并同意遵守本站<a href="">站规细则</a>。</div>
        </form>
    <?php } ?>
    </div>
    <div id="footer">
        <p>© 2020–2021 宁师青柠BBS</p>
    </div>
  </body>
  <script src="public/js/jquery.min.js"></script>
  <script async src="public/js/register.all.js"></script>
</html>
